
cmake_minimum_required(VERSION 3.18)

# set the project name and version
project(Testmymath
    LANGUAGES CXX
)

# 启用测试支持
include(CTest)

file(GLOB SRC_LISTS "./*.cpp")

add_executable(main ${SRC_LISTS})#添加可执行程序

find_package(MYMATH CONFIG REQUIRED)#找对应/usr/local下的配置文件

target_link_libraries(main PRIVATE  math::MYMATH)#发现需要依赖的有库；因此就是去把库这个归档文件给合并

# 将测试添加到 CTest
add_test(
    NAME Testmymath
    COMMAND main
)